<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link href="../../../js/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="../../../css/footer.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/foods_pay.css" />
		<style type="text/css">
			/*修改底部字体颜色*/
			
			.foot:nth-child(2) {
				color: #e83023;
			}
		</style>
		<script src="../../../js/flexible.min.js" type="text/javascript" charset="utf-8"></script>

	</head>

	<body>
		<div id="wrap">
			<div id="main">
				<div id="header">
					<a id="headImg" href="javascript:history.go(-1)"><img class="headImg" src="../../../images/12.png" /></a>
					<p id="headTitle">商品支付</p>
				</div>
				<div id="content">
					<!--商品信息核实-->
					<div id="info_confirm">
						商品信息核实
					</div>
					<!--详细信息-->
					<div id="info_detail">
						<ul id="info_list">
							<li>
								<img src="../../../images/coalltion/shop.png" /><span>商店名称：</span><span id="shopName"></span>
							</li>
							<li>
								<img src="../../../images/coalltion/type.png" /><span>类型：</span><span id="catName2"></span>
							</li>
							<li>
								<img src="../../../images/coalltion/address.png" /><span>商家地址：</span><span id="shopAdd"></span>
							</li>
						</ul>
						<img id="line" src="../../../images/coalltion/16.png" />
						<!--立即支付-->
						<div id="pay_money">
							<span id="dingdan">订单金额：</span>
							<input type="number" name="count" id="count" value="" />
							<button id="pay_btn">确定支付</button>
						</div>
					</div>

				</div>
			</div>
			<div id="foot" class="row">
			<a class="foot col-xs-3 col-sm-3" href="../../kaoqin/index2.html">
					<img class="footImg" src="../../../images/15.png" />
					<p>管理</p>
				</a>
			<a class="foot col-xs-3 col-sm-3" href="../colalition.html">
					<img class="footImg" src="../../../images/14.png" />
					<p>联盟</p>
				</a>
			<a class="foot col-xs-3 col-sm-3" href="../../store/store.html">
					<img class="footImg" src="../../../images/11.png" />
					<p>商城</p>
				</a>
			<a class="foot col-xs-3 col-sm-3" href="../../personage/personIndex.html">
					<img class="footImg" src="../../../images/13.png" />
					<p>我的</p>
				</a>
			</div>
		</div>

	</body>
	<script src="../../../js/jquery-2.2.3.min.js"></script>
	<script src="../../../js/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
	<script type="text/javascript">
		var shopId = "";
		$(function(){
			var test = window.location.href;
			if(test.indexOf("shopId=")>-1){ 
				shopId = test.split("?")[1].split("=")[1];
			} 
			if(shopId == ""){
				alert("系统内部错误，请联系系统管理员！");
			}
			//获取商户详细信息
			$.ajax({
				type:"GET",
				url:"http://47.104.13.109/mall-service/shop/search?shopId="+shopId,
				async:true,
				success:function(data){
					if(data != null){
						document.getElementById('shopName').innerHTML = data.shopName;
						document.getElementById('catName2').innerHTML = data.catName2;
						document.getElementById('shopAdd').innerHTML = data.shopAdd;
					}
				}
			});
			$('#pay_btn').on('click',function(){
				if(shopId != ""){
					if($('#count').val()){
						if(parseFloat($('#count').val())>0){
							window.location.href="pay_now.html?shopId="+shopId+"&count="+$('#count').val();
						}else{
							alert("请正确填写金额");
						}
					}else{
						alert("请填写金额");
					}
				}
				
			})
			
			
			
		})
	</script>
</html>